package com.xyq.fs.contants.filesuffixes2;

import java.util.HashSet;
import java.util.Set;

import com.xyq.fs.views.WindwosA;

public class TxtEnums {

	private static final Set<String> TXT_SET = new HashSet<>();

	static {
		TXT_SET.add(".TXT");
		TXT_SET.add(".JAVA");
		TXT_SET.add(".JS");
		TXT_SET.add(".SQL");
		TXT_SET.add(".CSS");
		TXT_SET.add(".HTML");
		TXT_SET.add(".PY");
		TXT_SET.add(".CPP");
		TXT_SET.add(".HTML");
		TXT_SET.add(".XML");
		TXT_SET.add(".PHP");
		TXT_SET.add(".JSP");
		TXT_SET.add(".CSV");
	}

	public static boolean contains(String suffix) {

		return TXT_SET.contains(suffix);
	}

	public static boolean suffixContains(String suffix) {

		if (WindwosA.getCb2().isSelected())
			return suffix.endsWith(".TXT");
		for (String s : TXT_SET) {
			if (suffix.endsWith(s))
				return true;
		}
		return false;
	}

	public static Set<String> getValues() {

		return TXT_SET;
	}

}
